﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/Tesorera.Master" AutoEventWireup="true" CodeBehind="FormularioPresupuesto.aspx.cs" Inherits="Interfaces.Presupuesto.FormularioPresupuesto" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style1
        {
            width: 99%;
        }
        .style3
        {
            width: 209px;
            height: 25px;
        }
        .style4
        {
            height: 25px;
        }
        .style5
        {
            font-family: Arial, Helvetica, sans-serif;
            color: #3366FF;
            font-size: medium;
        }
        .style6
        {
            text-align: center;
        }
        .style8
        {
            width: 100%;
        }
        </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:MultiView ID="MultiView1" runat="server">
        <asp:View ID="View1" runat="server">
            <asp:UpdatePanel ID="UpdatePanel1" runat="server" 
                ondisposed="UpdatePanel1_Disposed">
                <ContentTemplate>
                    <div class="style6">
                        <asp:Panel ID="Panel7" runat="server" GroupingText="Modificar presupuesto" 
                            style="margin-right: 380px">
                            <asp:Label ID="gestion" runat="server" Text="Label"></asp:Label>
                            <br />
                            <asp:Button ID="Button10" runat="server" onclick="Button10_Click" 
                                Text="Ingresos" CssClass=JCIstyle />
                            <asp:Button ID="Button11" runat="server" onclick="Button11_Click" 
                                Text="Egresos" CssClass=JCIstyle />
                            <br />
                            <asp:Panel ID="Panel1" runat="server" GroupingText="Agregar Ingreso" 
                                Width="827px">
                                <table class="style1">
                                    <tr>
                                        <td style="text-align: left">
                                            <asp:DropDownList ID="DropDownList1" runat="server" 
                                                DataSourceID="DataSourceDropDownList" DataTextField="Nombre" 
                                                DataValueField="Codigo" Height="18px" Width="220px">
                                            </asp:DropDownList>
                                            <br />
                                            <asp:LinkButton ID="LinkButton6" runat="server" onclick="LinkButton6_Click">Asociar con programa</asp:LinkButton>
                                            <br />
                                            <asp:Panel ID="Panel8" runat="server" GroupingText="Programa" Visible="False">
                                                <asp:Label ID="Nombre" runat="server"></asp:Label>
                                                <br />
                                                <asp:LinkButton ID="LinkButton7" runat="server" onclick="LinkButton7_Click">Eliminar</asp:LinkButton>
                                            </asp:Panel>
                                            <asp:SqlDataSource ID="DataSourceDropDownListEgreso" runat="server" 
                                                ConnectionString="<%$ ConnectionStrings:JCIConnectionString %>" 
                                                SelectCommand="SELECT * FROM [Evento] WHERE ([Tipo] = @Tipo)">
                                                <SelectParameters>
                                                    <asp:Parameter DefaultValue="E" Name="Tipo" Type="String" />
                                                </SelectParameters>
                                            </asp:SqlDataSource>
                                            <asp:SqlDataSource ID="DataSourceDropDownList" runat="server" 
                                                ConnectionString="<%$ ConnectionStrings:JCIConnectionString %>" 
                                                SelectCommand="SELECT * FROM [Evento] WHERE ([Tipo] = @Tipo)">
                                                <SelectParameters>
                                                    <asp:Parameter DefaultValue="I" Name="Tipo" Type="String" />
                                                </SelectParameters>
                                            </asp:SqlDataSource>
                                        </td>
                                        <td>
                                            <table class="style8">
                                                <tr>
                                                    <td>
                                                        Cantidad:&nbsp;&nbsp;</td>
                                                    <td>
                                                        <asp:TextBox ID="TextBox7" runat="server" Height="21px" MaxLength="7" 
                                                            Width="121px"></asp:TextBox>
                                                        <ajaxToolkit:FilteredTextBoxExtender ID="TextBox7_FilteredTextBoxExtender" 
                                                            runat="server" Enabled="True" FilterType="Numbers" TargetControlID="TextBox7">
                                                        </ajaxToolkit:FilteredTextBoxExtender>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        Valor Unitario($us):&nbsp;&nbsp;</td>
                                                    <td>
                                                        <asp:TextBox ID="TextBox8" runat="server" Height="21px" MaxLength="9" 
                                                            ontextchanged="TextBox8_TextChanged" Width="121px"></asp:TextBox>
                                                        <ajaxToolkit:FilteredTextBoxExtender ID="TextBox8_FilteredTextBoxExtender" 
                                                            runat="server" Enabled="True" FilterType="Custom, Numbers" 
                                                            TargetControlID="TextBox8" ValidChars=",">
                                                        </ajaxToolkit:FilteredTextBoxExtender>
                                                    </td>
                                                </tr>
                                            </table>
                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
                                            <br />
                                        </td>
                                        <td>
                                            &nbsp;<br />
                                            <asp:Button ID="Button6" runat="server" Height="46px" onclick="Button6_Click" 
                                                Text="Agregar" Width="107px" CssClass=JCIstyle />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="style3">
                                            <asp:Panel ID="Panel4" runat="server" GroupingText="Registrar Evento">
                                                <asp:TextBox ID="TextBox9" runat="server" MaxLength="30" Width="239px"></asp:TextBox>
                                                <ajaxToolkit:TextBoxWatermarkExtender ID="TextBox9_TextBoxWatermarkExtender" 
                                                    runat="server" Enabled="True" TargetControlID="TextBox9" 
                                                    WatermarkText="Ingrese Nombre">
                                                </ajaxToolkit:TextBoxWatermarkExtender>
                                                <br />
                                                <asp:TextBox ID="TextBox10" runat="server" MaxLength="150" Width="239px"></asp:TextBox>
                                                <ajaxToolkit:TextBoxWatermarkExtender ID="TextBox10_TextBoxWatermarkExtender" 
                                                    runat="server" Enabled="True" TargetControlID="TextBox10" 
                                                    WatermarkText="Ingrese Descripcion">
                                                </ajaxToolkit:TextBoxWatermarkExtender>
                                                <br />
                                                <asp:Button ID="Button7" runat="server" onclick="Button5_Click" Text="Añadir" CssClass=JCIstyle />
                                                <br />
                                                <asp:Label ID="Label8" runat="server" ForeColor="Red"></asp:Label>
                                                <br />
                                                <asp:Label ID="Label15" runat="server" 
                                                    style="color: #00CC00; background-color: #FFFFFF" Visible="False">Se creo el evento</asp:Label>
                                                <br />
                                            </asp:Panel>
                                        </td>
                                        <td class="style4">
                                            &nbsp;</td>
                                        <td class="style4">
                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                        </td>
                                        <td class="style4">
                                        </td>
                                    </tr>
                                </table>
                                <asp:Label ID="Label5" runat="server" ForeColor="Red"></asp:Label>
                                <br />
                                <asp:Label ID="Label16" runat="server" 
                                    style="color: #00CC00; background-color: #FFFFFF" Visible="False">Se registro exitosamente</asp:Label>
                            </asp:Panel>
                            <br />
                            <asp:Panel ID="Panel6" runat="server" GroupingText="Editar" Visible="False">
                                Nombre:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                <asp:Label ID="NombreEditar" runat="server"></asp:Label>
                                <br />
                                Descripcion:&nbsp;&nbsp;&nbsp;&nbsp;
                                <asp:Label ID="DescripcionEditar" runat="server"></asp:Label>
                                <br />
                                Valor Unitario:
                                <asp:TextBox ID="TextBox15" runat="server" MaxLength="9"></asp:TextBox>
                                <ajaxToolkit:FilteredTextBoxExtender ID="TextBox15_FilteredTextBoxExtender" 
                                    runat="server" Enabled="True" FilterType="Custom, Numbers" 
                                    TargetControlID="TextBox15" ValidChars=",">
                                </ajaxToolkit:FilteredTextBoxExtender>
                                <br />
                                Cantidad:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                <asp:TextBox ID="TextBox16" runat="server" MaxLength="7"></asp:TextBox>
                                <ajaxToolkit:FilteredTextBoxExtender ID="TextBox16_FilteredTextBoxExtender" 
                                    runat="server" Enabled="True" FilterType="Numbers" TargetControlID="TextBox16">
                                </ajaxToolkit:FilteredTextBoxExtender>
                                <br />
                                <asp:Label ID="ErrorEditar" runat="server" ForeColor="Red"></asp:Label>
                                <br />
                                <asp:Button ID="Button8" runat="server" onclick="Button8_Click" 
                                    Text="Guardar" CssClass=JCIstyle />
                                <ajaxToolkit:ConfirmButtonExtender ID="Button8_ConfirmButtonExtender" 
                                    runat="server" ConfirmText="Se guardaran todos los cambios desea continuar?" 
                                    Enabled="True" TargetControlID="Button8">
                                </ajaxToolkit:ConfirmButtonExtender>
                                &nbsp;<asp:Button ID="Button9" runat="server" onclick="Button9_Click" 
                                    Text="Cancelar" CssClass=JCIstyle />
                                <ajaxToolkit:ConfirmButtonExtender ID="Button9_ConfirmButtonExtender" 
                                    runat="server" ConfirmText="Se perderan los cambios, desea continuar?" 
                                    Enabled="True" TargetControlID="Button9">
                                </ajaxToolkit:ConfirmButtonExtender>
                            </asp:Panel>
                            <asp:Panel ID="Panel2" runat="server" GroupingText="Ingresos" Width="893px">
                                <asp:DataList ID="DataList1" runat="server" 
                                    onitemcommand="DataList1_ItemCommand" Width="828px">
                                    <HeaderTemplate>
                                        <tr style="color:#000000">
                                       <td style='border:2px solid #123456;' bgcolor="#3a67b1" >
                                       
                                                <asp:Label ID="Label9" runat="server" Text="Nombre"></asp:Label>
                                            </td>
                                             <td style='border:2px solid #123456;' bgcolor="#3a67b1">
                                       
                                                &nbsp;<asp:Label ID="Label10" runat="server" Text="Cantidad"></asp:Label>
                                            </td>
                                        <td style='border:2px solid #123456;' bgcolor="#3a67b1">
                                               &nbsp;<asp:Label ID="Label11" runat="server" Text="Valor Unitario"></asp:Label>
                                            </td>
                                        <td style='border:2px solid #123456;' bgcolor="#3a67b1">
                                               &nbsp;<asp:Label ID="Label12" runat="server" Text="Total"></asp:Label>
                                            </td>
                                        </tr>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                       <tr style="color:#000000">
                                            <td style='border:2px solid #123456;'>
                                            &nbsp;<asp:Label ID="Label7" runat="server" Text='<%# Eval("Nombre") %>'></asp:Label>
                                            </td>
                                        <td style='border:2px solid #123456;'>
                                                &nbsp;<asp:Label ID="Label3" runat="server" Text='<%# Eval("Cantidad") %>'></asp:Label>
                                            </td>
                                        <td style='border:2px solid #123456;'>
                                                <asp:Label ID="Label2" runat="server" Text='<%# Eval("ValorUnitario") %>'></asp:Label>
                                            </td>
                                        <td style='border:2px solid #123456;'>
                                                &nbsp;<asp:Label ID="Label4" runat="server" Text='<%# Eval("Total") %>'></asp:Label>
                                            </td>
                                        <td style='border:2px solid #123456;'>
                                                <asp:LinkButton ID="LinkButton3" runat="server" CommandName="Editar">Editar</asp:LinkButton>
                                                <br />
                                            </td>
                                            <asp:Label ID="Label1" runat="server" Text='<%# Eval("Descripcion") %>' 
                                                Visible="False"></asp:Label>
                                            </td>
                                        <td style='border:2px solid #123456;'>
                                                <asp:LinkButton ID="LinkButton4" runat="server" CommandName="Eliminar">Eliminar</asp:LinkButton>
                                                <ajaxToolkit:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" 
                                                    ConfirmText="esta usted seguro que desea eliminar?" 
                                                    TargetControlID="LinkButton4">
                                                </ajaxToolkit:ConfirmButtonExtender>
                                                &nbsp;<asp:Label ID="Label6" runat="server" Text='<%# Eval("CodigoIE") %>' 
                                                    Visible="False"></asp:Label>
                                            </td>
                                        </tr>
                                    </ItemTemplate>
                                </asp:DataList>
                            </asp:Panel>
                            <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
                            </asp:ScriptManagerProxy>
                            <br />
                            <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                                ConnectionString="Data Source=NELSON-HP\SQLEXPRESS;Initial Catalog=JCI;Integrated Security=True;Pooling=False">
                            </asp:SqlDataSource>
                        </asp:Panel>
                        <br />
                        <br />
                        <br />
                    </div>
                </ContentTemplate>
            </asp:UpdatePanel>
        </asp:View>
        <asp:View ID="View2" runat="server">
            <span class="style5">Usted No Puede Acceder a esta Pagina debido a:<br />
            <br />
            </span>
            <asp:Label ID="LabelError" runat="server" Font-Size="Medium" 
                ForeColor="#3333FF" Text="Error"></asp:Label>
            <br />
            <br />
            <span class="style5">Pruebe ingresando desde el siguiente enlace:<br /> </span>
            <asp:LinkButton ID="LinkButton5" runat="server" onclick="LinkButton5_Click">Crear Gestion</asp:LinkButton>
            <br style="color: #3333CC; font-family: Arial, Helvetica, sans-serif" />
        </asp:View>
    </asp:MultiView>
    <br />
    <br/>
    

</asp:Content>
